package com.tbit.main.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author chenmengran
 * @Description: TODO
 * @date 2019\2\22 002214:37
 */
@Configuration
public class AppPushConstant {
    /**
     * App推送加密
     */
    public final static String PUSH_SECRET = "YQZNTBITZXCV";
    /**
     * 极光推送类型 别名
     */
    public final static String PUSH_TYPE_ALIAS = "alias";
    /**
     * 极光推送类型 标签
     */
    public final static String PUSH_TYPE_TAG = "tag";
    /**
     * 极光推送类型 registrationId
     */
    public final static String PUSH_TYPE_REGID = "registrationId";
    /**
     * 极光推送类型 所有人
     */
    public final static String PUSH_TYPE_ALL = "all";
    /**
     * 极光推送 Master secret
     */
    public static String MASTER_SECRET;
    /**
     * 极光推送App key
     */
    public static String APPKEY;

    @Value("${tbit-system.JPush-secret}")
    public void setMASTER_SECRET(String master_secret) {
        MASTER_SECRET = master_secret;
    }

    @Value("${tbit-system.JPush-key}")
    public void setAPPKEY(String appkey) {
        APPKEY = appkey;
    }

    /**
     * 用于监听到RefreshEvent事件后操作触发创建新实例对象
     */
    public void refresh() {
        System.out.println("刷新配置，触发创建新实例对象");
    }
}
